package lapsnake.model.stmt;

import lapsnake.model.*;
import lapsnake.model.data.ChildField;
import lapsnake.model.data.OptionalChild;
import lapsnake.py.ast.ASTHelperFactory; import java.beans.PropertyVetoException;

import org.python.antlr.ast.*;

/**Wrapper class with helper functions for Return nodes*/
public class LapReturn extends LapStatement {
    public final OptionalChild<LapExpression> retval = new OptionalChild<>(this, LapExpression.class);

    public LapReturn(PyAST pyAST, ChildField<? super LapReturn> parent, Return node) throws PropertyVetoException {
	super(pyAST, parent, node);
	
	ASTHelperFactory.makeHelper(pyAST, retval, node.getInternalValue());
	
	buildTextNodes(node);
    }
}
